﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ManageRestaurants.aspx.cs" Inherits="ManageRestaurants"%>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
<telerik:RadCodeBlock ID="block" runat="server">
    <script language="javascript" type="text/javascript">
        function OnClientCommandExecutingRE1(editor, args) {
            //The command name
            var commandName = args.get_commandName();
            if (commandName == "ImageManager") {
                var dialogs = $find('<%=InfoBox.ClientID %>').get_windows();
                var detailPage = dialogs[0];
                detailPage.setUrl("InsertImage.aspx?Act=edit");
                detailPage.show();
                args.set_cancel(true);
            }
            return;
        }
        function OnClientCommandExecutingREI1(editor, args) {
            //The command name
            var commandName = args.get_commandName();
            if (commandName == "ImageManager") {
                var dialogs = $find('<%=InfoBox.ClientID %>').get_windows();
                var detailPage = dialogs[1];
                detailPage.setUrl("InsertImage.aspx?Act=insert");
                detailPage.show();
                args.set_cancel(true);
            }
            return;
        }
        function OnClientshow1(radWindow) {
            //Get current content of textarea
            var editor = $find('<%=((RadEditor)GridView1.Rows[0].FindControl("RadEditor1")).ClientID %>');
            var oText = editor.get_html();
            
            //Create a new Object to be used as an argument to the radWindow
            var arg = new Object();
            //Using an Object as a argument is convenient as it allows setting many properties.
            arg.TextValue = oText;

            //Set the argument object to the radWindow        
            radWindow.Argument = arg;
        }
        function OnClientshow2(radWindow) {
            //Get current content of textarea
            var editor = $find('<%=RadEditorI1.ClientID %>');
            var oText = editor.get_html();

            //Create a new Object to be used as an argument to the radWindow
            var arg = new Object();
            //Using an Object as a argument is convenient as it allows setting many properties.
            arg.TextValue = oText;

            //Set the argument object to the radWindow        
            radWindow.Argument = arg;
        }
        function CallBackFunction1(radWindow, returnValue) {
            var editor = $find('<%=((RadEditor)GridView1.Rows[0].FindControl("RadEditor1")).ClientID %>');
            var oText = editor.set_html(returnValue);
        }
        function CallBackFunction2(radWindow, returnValue) {
            var editor = $find('<%=RadEditorI1.ClientID %>');
            var oText = editor.set_html(returnValue);
        }
    </script>
    <script src="Scripts/vietuni.js" type="text/javascript"></script>
</telerik:RadCodeBlock>
    <telerik:RadWindowManager ID="InfoBox" runat="server" VisibleStatusbar="false" Behaviors="None">
        <Windows>
            <telerik:RadWindow ID="RadWindow1" Title="Chèn hình" NavigateUrl="InsertImage.aspx"
                runat="server" Width="800" Height="300" Modal="true" ShowContentDuringLoad="false" OnClientshow = "OnClientshow1" ClientCallBackFunction="CallBackFunction1">
            </telerik:RadWindow>
            <telerik:RadWindow ID="RadWindow2" Title="Chèn hình" NavigateUrl="InsertImage.aspx"
                runat="server" Width="800" Height="300" Modal="true" ShowContentDuringLoad="false" OnClientshow = "OnClientshow2" ClientCallBackFunction="CallBackFunction2">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:EatDrinkConnectionString %>" 
        SelectCommand="SELECT * FROM [Location]"></asp:SqlDataSource>
    <div id="restmanage-wrapper">
        <div id="before">
            <div id="menu">
                <img src="Images/Design/edit.gif" height="16" width="16" alt="edit" align="left"/>
                <div style="margin-top:9px"><a href="#">Thay đổi thông tin</a>&nbsp;|&nbsp;<a href="#">Thêm nhà hàng mới</a></div>
            </div>
            <div id="editmenu" class="hiddens">
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Design/edit.gif" AlternateText="edit" Height="16"
                    Width="16" align="left"/><div style="margin-top:5px"> Nhấp chuột vào một trong các phần dưới đây để cập nhật thông tin&nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnDoneEdit" runat="server" Text="Kết thúc cập nhật" OnClick="btnDoneEdit_Click"/>
            </div>
            </div>
            <div id="main">
            <asp:GridView ID="GridView1" runat="server" DataKeyNames="RestID" AutoGenerateColumns="false"
                 Width="830" ShowHeader="false" BorderColor="#f4f5f6" BorderStyle="None" BorderWidth="0">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <div id="main-viewcontent">
                                <div class="item">
                                    <fieldset style="padding-bottom:10px; padding-left:7px; padding-right:7px">
                                        <legend style="padding:0 2px 0 2px">Giới thiệu</legend>
                                        <div class="item-content">
                                            <table>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Giới thiệu ngắn :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label23" runat="server" Text='<%#Eval("ShortDescription") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Giới thiệu chi tiết :
                                                    </td>
                                                    <td style="padding-left: 10px; text-align:justify">
                                                        <asp:Label ID="Label24" runat="server" Text='<%#Eval("LongDescription") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </fieldset>
                                </div>
                                <div class="item">
                                    <fieldset style="padding-bottom:10px; padding-left:7px; padding-right:7px">
                                        <legend style="padding:0 2px 0 2px">Thông tin quán</legend>
                                        <div class="item-content">
                                            <table>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Tên quán :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label4" runat="server" Text='<%#Eval("RestName") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Loại quán :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label5" runat="server" Text='<%#Eval("RestCat") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Địa chỉ :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label25" runat="server" Text='<%#Eval("Address") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Hướng dẫn đường đi :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label26" runat="server" Text='<%#Eval("AddressDescription") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Khẩu hiệu của quán :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label27" runat="server" Text='<%#Eval("Slogan") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Địa điểm :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label28" runat="server" Text='<%#Eval("LocationID") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Số điện thoại :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label29" runat="server" Text='<%#Eval("PhoneNumber") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Địa chỉ email :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label30" runat="server" Text='<%#Eval("Email") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Số fax :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label31" runat="server" Text='<%#Eval("Fax") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Website riêng :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label32" runat="server" Text='<%#Eval("Website") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Số lượng chỗ ngồi :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label33" runat="server" Text='<%#Eval("SeatCount") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Cho phép đặt trước :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label34" runat="server" Text='<%#Eval("IsOrder") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Thời gian phục vụ :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label35" runat="server" Text='<%#Eval("ServedTime") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Kiểu thanh toán :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label37" runat="server" Text='<%#Eval("PaymentType") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Ngôn ngữ :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label39" runat="server" Text='<%#Eval("Language") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Giá tiền trung bình :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label40" runat="server" Text='<%#Eval("AveragePrice") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Dịch vụ khác :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label42" runat="server" Text='<%#Eval("SubServices") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-weight: bold; width: 230px">
                                                        Lưu ý khác :
                                                    </td>
                                                    <td style="padding-left: 10px">
                                                        <asp:Label ID="Label43" runat="server" Text='<%#Eval("Note") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </fieldset>
                                </div>
                            </div>
                            <div id="main-editcontent" class="hiddens">
                                <div class="bogo">
                                    <label style="width:100; font-weight:bold">Bộ gõ : </label>
                                    <input type="radio" name="switcher1" value="OFF" checked="checked" onfocus="setTypingMode(0)" />Off&nbsp;
                                    <input type="radio" name="switcher1" value="TELEX" onfocus="setTypingMode(1)" />Telex&nbsp;
                                    <input type="radio" name="switcher1" value="VNI" onfocus="setTypingMode(2)" />VNI&nbsp;
                                    <input type="radio" name="switcher1" value="VIQR" onfocus="setTypingMode(3)" />VIQR&nbsp;
                                    <input type="radio" name="switcher1" value="ALL" onfocus="setTypingMode(4)" />Tổng
                                    Hợp (Telex, Vni, Viqr)
                                </div>
                                <div class="item">
                                    <div class="title"><h2>Thông tin quán</h2></div>
                                    <div class="item-content" style="display:none">
                                        <table>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Tên quán : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtRestName" runat="server" Text='<%#Eval("RestName") %>' Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox><br />
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Tên nhà hàng không được để trống" ForeColor="Red" Font-Size="10px" Display="Dynamic" ValidationGroup="Group1" ControlToValidate="txtRestName"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Loại quán : </td>
                                                <td style="padding-left:10px">
                                                    <asp:Label ID="lbStyles" runat="server" Text="Ngăn cách các loại quán bằng dấu ,"></asp:Label><br />
                                                    <asp:TextBox ID="txtRestStyle" runat="server" Text='<%#Eval("RestCat") %>' Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Địa chỉ : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtRestAddress" runat="server" TextMode="MultiLine" Width="500" Height="60" Text='<%#Eval("Address") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Hướng dẫn đường đi : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtRestAddressDesc" runat="server" TextMode="MultiLine" Width="500" Height="60" Text='<%#Eval("AddressDescription") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Khẩu hiệu của quán : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtRestSlogan" runat="server" Width="500" Height="20" Text='<%#Eval("Slogan") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Địa điểm : </td>
                                                <td style="padding-left:10px">
                                                    <telerik:RadComboBox ID="ddlRestLoc" runat="server" DataSourceID="SqlDataSource2" DataTextField="District"
                                                        DataValueField="LocationID" SelectedValue='<%#Eval("LocationID") %>' Skin="Inox">
                                                    </telerik:RadComboBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Số điện thoại : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtRestPhone" runat="server" Width="500" Height="20" Text='<%#Eval("PhoneNumber") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Địa chỉ email : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtRestEmail" runat="server" Width="500" Height="20" Text='<%#Eval("Email") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Số fax : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtRestFax" runat="server" Width="500" Height="20" Text='<%#Eval("Fax") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Website riêng : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtRestWebsite" runat="server" Width="500" Height="20" Text='<%#Eval("Website") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Số lượng chỗ ngồi : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtRestSeats" runat="server" Width="500" Height="20" Text='<%#Eval("SeatCount") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Cho phép đặt trước : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtRestIsOrder" runat="server" Width="500" Height="20" Text='<%#Eval("IsOrder") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Ngày nghỉ : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtOffDate" runat="server" Width="500" Height="20" Text='<%#Eval("OffDate") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Thời gian phục vụ : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtRestServedTime" runat="server" Width="500" Height="20" Text='<%#Eval("ServedTime") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Kiểu thanh toán : </td>
                                                <td style="padding-left:10px">
                                                    <asp:Label ID="Label1" runat="server" Text="Ngăn cách các kiểu thanh toán bằng dấu ,"></asp:Label><br />
                                                    <asp:TextBox ID="txtRestPayment" runat="server" Width="500" Height="20" Text='<%#Eval("PaymentType") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Ngôn ngữ : </td>
                                                <td style="padding-left:10px">
                                                    <asp:Label ID="Label2" runat="server" Text="Ngăn cách các ngôn ngữ bằng dấu ,"></asp:Label><br />
                                                    <asp:TextBox ID="txtRestLanaguage" runat="server" Width="500" Height="20" Text='<%#Eval("Language") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Giá tiền trung bình : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtRestAvaragePrice" runat="server" Width="500" Height="20" Text='<%#Eval("AveragePrice") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Dịch vụ khác : </td>
                                                <td style="padding-left:10px">
                                                    <asp:Label ID="Label3" runat="server" Text="Ngăn cách các dịch vụ bằng dấu ,"></asp:Label><br />
                                                    <asp:TextBox ID="txtRestService" runat="server" Width="500" Height="20" Text='<%#Eval("SubServices") %>' onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Lưu ý khác : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtRestNote" runat="server" Width="500" Height="60" Text='<%#Eval("Note") %>' TextMode="MultiLine" onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2" align="right">
                                                    <asp:Button ID="btnInfo" runat="server" Text="Lưu thông tin" onclick="btnInfo_Click" ValidationGroup="Group1"/>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                                <div class="item">
                                    <div class="title"><h2 class="hidden">Giới thiệu</h2></div>
                                    <div class="item-content">
                                        <table>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Giới thiệu ngắn : </td>
                                                <td style="padding-left:10px">
                                                    <asp:TextBox ID="txtShortDescription" runat="server" Text='<%#Eval("ShortDescription") %>' TextMode="MultiLine" Width="500" Height="60" onkeyup="initTyper(this);"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" style="font-weight:bold; width:230px">Giới thiệu chi tiết : </td>
                                                <td style="padding-left:10px">
                                                    <telerik:RadEditor ID="RadEditor1" runat="server" EnableResize="false" Skin="Office2007" Height="700px" Content='<%#Eval("LongDescription") %>' OnClientCommandExecuting="OnClientCommandExecutingRE1" onkeyup="initTyper(this);">
                                                        <Tools>
                                                            <telerik:EditorToolGroup>
                                                                <telerik:EditorTool Name="LinkManager"/>
                                                                <telerik:EditorTool Name="ImageManager" />
                                                            <telerik:EditorSeparator />
                                                                <telerik:EditorTool Name="FontName" />
                                                                <telerik:EditorTool Name="FontSize" />
                                                            <telerik:EditorSeparator />
                                                                <telerik:EditorTool Name="Bold" />
                                                                <telerik:EditorTool Name="Italic" />
                                                                <telerik:EditorTool Name="Underline" />
                                                            <telerik:EditorSeparator />
                                                                <telerik:EditorTool Name="ForeColor" />
                                                                <telerik:EditorTool Name="BackColor" />
                                                            <telerik:EditorSeparator />
                                                                <telerik:EditorTool Name="InsertOrderedList" />
                                                                <telerik:EditorTool Name="InsertUnorderedList" />
                                                                <telerik:EditorTool Name="Indent" />
                                                                <telerik:EditorTool Name="Outdent" />
                                                            </telerik:EditorToolGroup>
                                                        </Tools>
                                                    </telerik:RadEditor>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2" align="right">
                                                    <asp:Button ID="btnDesc" runat="server" Text="Lưu thông tin" 
                                                        onclick="btnDesc_Click"/>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                                <div class="item">
                                    <div class="title"><h2 class="hidden">Thực đơn</h2></div>
                                    <div class="item-content" style="display:none">
                                        <table>
                                            <tr>
                                                <td align="center" valign="top" style="font-weight:bold">Thực đơn : </td>
                                                <td style="padding-left:10px">
                                                    <telerik:RadEditor ID="RadEditor2" runat="server" EnableResize="false" Skin="Office2007"
                                                        Height="700px" BackColor="White" onkeyup="initTyper(this);">
                                                        <Tools>
                                                            <telerik:EditorToolGroup>
                                                                <telerik:EditorTool Name="LinkManager"/>
                                                                <telerik:EditorTool Name="ImageManager" />
                                                            <telerik:EditorSeparator />
                                                                <telerik:EditorTool Name="FontName" />
                                                                <telerik:EditorTool Name="FontSize" />
                                                            <telerik:EditorSeparator />
                                                                <telerik:EditorTool Name="Bold" />
                                                                <telerik:EditorTool Name="Italic" />
                                                                <telerik:EditorTool Name="Underline" />
                                                            <telerik:EditorSeparator />
                                                                <telerik:EditorTool Name="ForeColor" />
                                                                <telerik:EditorTool Name="BackColor" />
                                                            <telerik:EditorSeparator />
                                                                <telerik:EditorTool Name="InsertOrderedList" />
                                                                <telerik:EditorTool Name="InsertUnorderedList" />
                                                                <telerik:EditorTool Name="Indent" />
                                                                <telerik:EditorTool Name="Outdent" />
                                                            </telerik:EditorToolGroup>
                                                        </Tools>
                                                    </telerik:RadEditor>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2" align="right">
                                                    <asp:Button ID="btnMenu" runat="server" Text="Lưu thông tin" OnClick="btnMenu_Click"/>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                                <div class="item">
                                    <div class="title"><h2 class="hidden">Hình ảnh</h2></div>
                                    <div class="item-content" style="display:none">
                                        <fieldset>
                                            <legend style="padding:0 2px 0 2px">Hình Logo</legend>
                                            <telerik:RadUpload ID="RadUpload1" runat="server" BackColor="#FFF8C6" Skin="Hay"
                                                MaxFileInputsCount="1" AllowedFileExtensions=".jpg,.jpeg,.gif">
                                            </telerik:RadUpload>
                                        </fieldset>
                                        <br />
                                        <fieldset>
                                            <legend style="padding:0 2px 0 2px">Hình Banner</legend>
                                            <telerik:RadUpload ID="RadUpload2" runat="server" BackColor="#FFF8C6" Skin="Hay"
                                                MaxFileInputsCount="1" AllowedFileExtensions=".jpg,.jpeg,.gif">
                                            </telerik:RadUpload>
                                        </fieldset>
                                        <br />
                                        <fieldset>
                                            <legend style="padding:0 2px 0 2px">Flash</legend>
                                            <telerik:RadUpload ID="RadUpload3" runat="server" BackColor="#FFF8C6" Skin="Hay"
                                                MaxFileInputsCount="1" AllowedFileExtensions=".swf,.flv">
                                            </telerik:RadUpload>
                                        </fieldset>
                                        <br />
                                        <fieldset>
                                            <legend style="padding:0 2px 0 2px">Hình minh họa</legend>
                                            <telerik:RadUpload ID="RadUpload4" runat="server" BackColor="#FFF8C6" Skin="Hay"
                                                 InitialFileInputsCount="3" AllowedFileExtensions=".jpg,.jpeg,.gif">
                                            </telerik:RadUpload>
                                        </fieldset>
                                        <br />
                                        <asp:Button ID="btnUpload" runat="server" Text="Upload hình" OnClick="btnUpload_Click"/>
                                    </div>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <div id="main-insertcontent" class="hiddens">
                <div class="bogo">
                    <div style="width:500px; float:left">
                        <label style="width: 100; font-weight: bold">
                            Bộ gõ :
                        </label>
                        <input type="radio" name="switcher2" value="OFF" checked="checked" onfocus="setTypingMode(0)" />Off&nbsp;
                        <input type="radio" name="switcher2" value="TELEX" onfocus="setTypingMode(1)" />Telex&nbsp;
                        <input type="radio" name="switcher2" value="VNI" onfocus="setTypingMode(2)" />VNI&nbsp;
                        <input type="radio" name="switcher2" value="VIQR" onfocus="setTypingMode(3)" />VIQR&nbsp;
                        <input type="radio" name="switcher2" value="ALL" onfocus="setTypingMode(4)" />Tổng
                        Hợp (Telex, Vni, Viqr)
                    </div>
                    <div align="right">
                        <asp:Button ID="btnInsert" runat="server" Text="Lưu tất cả" ValidationGroup="Group2" OnClick="btnInsert_Click"/>
                    </div>
                </div>
                <div class="item">
                    <div class="title">
                        <h2>Thông tin quán</h2>
                    </div>
                    <div class="item-content" style="display: none">
                        <table>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Tên quán :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestName" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox><br />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Tên nhà hàng không được để trống" ForeColor="Red" Font-Size="10px" Display="Dynamic" ValidationGroup="Group2" ControlToValidate="txtIRestName"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Loại quán :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:Label ID="lbIStyles" runat="server" Text="Ngăn cách các loại quán bằng dấu ,"></asp:Label><br />
                                    <asp:TextBox ID="txtIRestStyle" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Địa chỉ :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestAddress" runat="server" TextMode="MultiLine" Width="500"
                                        Height="60" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Hướng dẫn đường đi :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestAddressDesc" runat="server" TextMode="MultiLine" Width="500"
                                        Height="60" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Khẩu hiệu của quán :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestSlogan" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Địa điểm :
                                </td>
                                <td style="padding-left: 10px">
                                    <telerik:RadComboBox ID="ddlIRestLoc" runat="server" DataSourceID="SqlDataSource2"
                                        DataTextField="District" DataValueField="LocationID" Skin="Inox">
                                    </telerik:RadComboBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Số điện thoại :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestPhone" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Địa chỉ email :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestEmail" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Số fax :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestFax" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Website riêng :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestWebsite" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Số lượng chỗ ngồi :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestSeats" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Cho phép đặt trước :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestIsOrder" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Ngày nghỉ :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestOffDate" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Thời gian phục vụ :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestServedTime" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Kiểu thanh toán :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:Label ID="LabelI1" runat="server" Text="Ngăn cách các kiểu thanh toán bằng dấu ,"></asp:Label><br />
                                    <asp:TextBox ID="txtIRestPayment" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Ngôn ngữ :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:Label ID="LabelI2" runat="server" Text="Ngăn cách các ngôn ngữ bằng dấu ,"></asp:Label><br />
                                    <asp:TextBox ID="txtIRestLanaguage" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Giá tiền trung bình :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestAvaragePrice" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Dịch vụ khác :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:Label ID="LabelI3" runat="server" Text="Ngăn cách các dịch vụ bằng dấu ,"></asp:Label><br />
                                    <asp:TextBox ID="txtIRestService" runat="server" Width="500" Height="20" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Lưu ý khác :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIRestNote" runat="server" Width="500" Height="60" TextMode="MultiLine" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="item">
                    <div class="title">
                        <h2 class="hidden">Giới thiệu</h2>
                    </div>
                    <div class="item-content">
                        <table>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Giới thiệu ngắn :
                                </td>
                                <td style="padding-left: 10px">
                                    <asp:TextBox ID="txtIShortDescription" runat="server" TextMode="MultiLine" Width="500" Height="60" onkeyup="initTyper(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" style="font-weight: bold; width: 230px">
                                    Giới thiệu chi tiết :
                                </td>
                                <td style="padding-left: 10px">
                                    <telerik:RadEditor ID="RadEditorI1" runat="server" EnableResize="false" Skin="Office2007"
                                        Height="700px" OnClientCommandExecuting="OnClientCommandExecutingREI1" onkeyup="initTyper(this);">
                                        <Tools>
                                            <telerik:EditorToolGroup>
                                                <telerik:EditorTool Name="LinkManager" />
                                                <telerik:EditorTool Name="ImageManager" />
                                                <telerik:EditorSeparator />
                                                <telerik:EditorTool Name="FontName" />
                                                <telerik:EditorTool Name="FontSize" />
                                                <telerik:EditorSeparator />
                                                <telerik:EditorTool Name="Bold" />
                                                <telerik:EditorTool Name="Italic" />
                                                <telerik:EditorTool Name="Underline" />
                                                <telerik:EditorSeparator />
                                                <telerik:EditorTool Name="ForeColor" />
                                                <telerik:EditorTool Name="BackColor" />
                                                <telerik:EditorSeparator />
                                                <telerik:EditorTool Name="InsertOrderedList" />
                                                <telerik:EditorTool Name="InsertUnorderedList" />
                                                <telerik:EditorTool Name="Indent" />
                                                <telerik:EditorTool Name="Outdent" />
                                            </telerik:EditorToolGroup>
                                        </Tools>
                                    </telerik:RadEditor>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="item">
                    <div class="title">
                        <h2 class="hidden">Thực đơn</h2>
                    </div>
                    <div class="item-content" style="display: none">
                        <table>
                            <tr>
                                <td align="center" valign="top" style="font-weight: bold">
                                    Thực đơn :
                                </td>
                                <td style="padding-left: 10px">
                                    <telerik:RadEditor ID="RadEditorI2" runat="server" EnableResize="false" Skin="Office2007"
                                        Height="700px" BackColor="White" onkeyup="initTyper(this);">
                                        <Tools>
                                            <telerik:EditorToolGroup>
                                                <telerik:EditorTool Name="LinkManager" />
                                                <telerik:EditorTool Name="ImageManager" />
                                                <telerik:EditorSeparator />
                                                <telerik:EditorTool Name="FontName" />
                                                <telerik:EditorTool Name="FontSize" />
                                                <telerik:EditorSeparator />
                                                <telerik:EditorTool Name="Bold" />
                                                <telerik:EditorTool Name="Italic" />
                                                <telerik:EditorTool Name="Underline" />
                                                <telerik:EditorSeparator />
                                                <telerik:EditorTool Name="ForeColor" />
                                                <telerik:EditorTool Name="BackColor" />
                                                <telerik:EditorSeparator />
                                                <telerik:EditorTool Name="InsertOrderedList" />
                                                <telerik:EditorTool Name="InsertUnorderedList" />
                                                <telerik:EditorTool Name="Indent" />
                                                <telerik:EditorTool Name="Outdent" />
                                            </telerik:EditorToolGroup>
                                        </Tools>
                                    </telerik:RadEditor>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="item">
                    <div class="title">
                        <h2 class="hidden">
                            Hình ảnh</h2>
                    </div>
                    <div class="item-content" style="display: none">
                        <fieldset>
                            <legend style="padding: 0 2px 0 2px">Hình Logo</legend>
                            <telerik:RadUpload ID="RadUploadI1" runat="server" BackColor="#FFF8C6" Skin="Hay"
                                MaxFileInputsCount="1" AllowedFileExtensions=".jpg,.jpeg,.gif">
                            </telerik:RadUpload>
                        </fieldset>
                        <br />
                        <fieldset>
                            <legend style="padding: 0 2px 0 2px">Hình Banner</legend>
                            <telerik:RadUpload ID="RadUploadI2" runat="server" BackColor="#FFF8C6" Skin="Hay"
                                MaxFileInputsCount="1" AllowedFileExtensions=".jpg,.jpeg,.gif">
                            </telerik:RadUpload>
                        </fieldset>
                        <br />
                        <fieldset>
                            <legend style="padding: 0 2px 0 2px">Flash</legend>
                            <telerik:RadUpload ID="RadUploadI3" runat="server" BackColor="#FFF8C6" Skin="Hay"
                                MaxFileInputsCount="1" AllowedFileExtensions=".swf,.flv">
                            </telerik:RadUpload>
                        </fieldset>
                        <br />
                        <fieldset>
                            <legend style="padding: 0 2px 0 2px">Hình minh họa</legend>
                            <telerik:RadUpload ID="RadUploadI4" runat="server" BackColor="#FFF8C6" Skin="Hay"
                                InitialFileInputsCount="3" MaxFileInputsCount="10" AllowedFileExtensions=".jpg,.jpeg,.gif">
                            </telerik:RadUpload>
                        </fieldset>
                    </div>
                </div>
            </div>
            </div>
        </div>       
    </div>
</asp:Content>